2.3 多媒体字段详解

音乐搜索字段详情

音乐全字段:

1.MusicSearchKey字段

字段名 字段含义 当前版本是否在使用 当前版本是否在使用
version 歌曲版本 N
playList 播放列表 N
operation 操作 N
object 对象 N
musicStyle 音乐风格 Y 我要听舒缓的歌:musicStyle=舒缓
songStructure 歌曲结构 N
songName 歌曲名 Y 我要听说好的幸福呢:songName=说好的幸福呢
songNum 歌曲数量 N
singerName 歌手名 Y 我要听周杰伦的歌:singerName=周杰伦
singerSex 歌手性别 Y 我要听女歌手的歌:singerSex=女生
pace 节奏 N
progress 进度 N
instrument 乐器 Y 我要听钢琴曲:instrument=钢琴
years 年代 Y 我要听八零年代的歌:years=八零年代
board 排行榜 N
date 日期 N
duration 时长 N
age 适用年龄 Y 我要听适合五岁小朋友听的歌:age=5岁
crowd 适用人群 Y 我要听适合五岁小朋友听的歌:crowd=小孩
musicScene 音乐场景 Y 我要听适合约会的歌:musicScene=约会
musicType 音乐类型 Y 我要听摇滚乐:musicType=摇滚
musicSource 音源 Y 我要听蓝牙音乐:musicSource=蓝牙
musicAppName 应用名 N
language 语种 Y 我要听英文歌:language=英文
repeatTimes 重复次数 N
theme 主题 Y 我要听三生三世的主题曲:theme=三生三世十里桃花
themeSongType 主题曲类型 Y 我要听三生三世的主题曲:themeSongType=主题曲
album 专辑 Y 我要听专辑叶惠美:album=叶惠美

2.目前搜索用不到这么多字段,有一些是预留字段,方便后面扩展。目前我们公版搜索时只用了如下字段:

public String getMusicKeyWord(MusicSearchKey searchKey) {
        if (null == searchKey) {
            return "";
        }

        StringBuilder sb = new StringBuilder();

        if (!TextUtils.isEmpty(searchKey.getLanguage())) {
            if (searchKey.getLanguage().contains("歌")) {
                sb.append(searchKey.getLanguage());
            } else {
                sb.append(searchKey.getLanguage()).append("歌");
            }
        }

        if (!TextUtils.isEmpty(searchKey.getSingerSex())) {
            if (TextUtils.equals("男生", searchKey.getSingerSex())) {
                sb.append("男歌手");
            } else if (TextUtils.equals("女生", searchKey.getSingerSex())) {
                sb.append("女歌手");
            } else {
                sb.append(searchKey.getSingerSex());
            }
        }


        sb.append(searchKey.getMusicStyle())
                .append(searchKey.getSongName())
                .append(searchKey.getSingerName())
                .append(searchKey.getInstrument())
                .append(searchKey.getYears())
                .append(searchKey.getBoard())
                .append(searchKey.getAge())
                .append(searchKey.getCrowd())
                .append(searchKey.getMusicScene())
                .append(searchKey.getMusicType())
                .append(searchKey.getMusicSource())
                .append(searchKey.getTheme())
                .append(searchKey.getThemeSongType())
                .append(searchKey.getAlbum());

        String keyWord = sb.toString().trim();
        AILog.i(TAG, "getMusicKeyWord:" + keyWord);
        return keyWord;
    }

电台全字段

1.RadioSearchKey字段

字段名 字段含义 当前版本是否在使用 当前版本是否在使用
program 节目 Y 我要听我的奋斗史:program=我的奋斗史
singer 艺人 Y 我要听郭德纲的相声:singer=郭德纲
category 类别 Y 我要听财经频道:category=财经
object 对象 Y 我要听在线电台:object=网络电台
column 栏目 Y 我要脱口秀:column=脱口秀
anyTxt 任意文本 Y 帮我播网络电台的兰亭集序:anyTxt=兰亭集序
serialNum 序列号 Y 放第三个的脱口秀:serialNum=第三个
category1 类别一 Y 我要听日本话的财经频道:category1=日本话
category2 类别二 Y 我要听日本话的财经频道:category2=财经
column1 栏目一 N
column2 栏目二 N
playAction 点播动作 N

2.目前我们公版搜索时只用了如下字段:

public String getRadioKeyWord(RadioSearchKey searchKey) {
        if (null == searchKey) {
            return "";
        }

        StringBuilder sb = new StringBuilder();

        sb.append(searchKey.getProgram())
                .append(searchKey.getSinger())
                .append(searchKey.getCategory())
                .append(searchKey.getObject())
                .append(searchKey.getColumn())
                .append(searchKey.getAnyTxt())
                .append(searchKey.getSerialNum())
                .append(searchKey.getCategory1())
                .append(searchKey.getCategory2())
                .append(searchKey.getColumn1())
                .append(searchKey.getColumn2())
                .append(searchKey.getPlayAction());

        String keyWord = sb.toString().trim();
        AILog.i(TAG, "getRadioKeyWord:" + keyWord);
        return keyWord;
    }

3.为了方便客户升级,补充一下新老版本的字段对应关系:

新版本字段名 字段含义 老版本字段名
program 节目 program
singer 艺人 artist
category 类别 category
object 对象 object
column 栏目 album
anyTxt 任意文本
serialNum 序列号
category1 类别一 category1
category2 类别二 category2
column1 栏目一
column2 栏目二
playAction 点播动作

results matching ""

    No results matching ""